<h3>Sites</h3>

<table>
  <tr>
    <th>Name</th>
    <th>Phone</th>
    <th>Updated</th>
  </tr>

<% for site in @sites %>
  <tr>
    <td><%=h site.name %></td>
    <td><%=h site.phone %></td>
    <td><%=dt site.updated_at %>

    <td><%= link_to 'Show', agency_site_path(params[:agency_id], site) %></td>
    <td><%= link_to 'Rooms', agency_site_rooms_path(params[:agency_id], site.id) %></td>
    <td><%= link_to 'Edit', edit_agency_site_path(params[:agency_id], site) %></td>
    <% if is_admin? -%>
      <td><%= link_to 'Delete', agency_site_path(params[:agency_id], site), :confirm => 'Are you sure?', :method => :delete, :class => 'delete' %></td>
    <% end -%>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'Add a new Site', new_agency_site_path %>
